Method of producing a reflective or refractive surface

ABSTRACT

A method and apparatus for producing a reflective or refractive surface that reflects or refracts light shined thereon and reproduces on a screen a desired greyscale intensity image on which the reflective or refractive surface is based and a corresponding apparatus, wherein the method permits a reproduction of a reference grayscale image with adjustable precision.

Embodiments of the invention relate to a method and an apparatus for producing a surface having a structure that reflects or refracts light shined thereon that reproduces on a screen a desired greyscale intensity image based on that the reflective or refractive surface was produced. Such an image is commonly known as caustics.

Generally, in optics caustics are patterns of light created by reflection or refraction on curved surfaces. Computing caustics in a given three dimensional scene has been the subject of extensive research in computer graphics as it constitutes one of the main difficulties of photorealistic rendering algorithms.

The task of reproducing a pre-specified light distribution by a specular surface also arises in the field of inverse reflector design, which concentrates on reflectors for lamps. A survey on inverse reflector design is given by Patow and Pueyo [2005]. Generally, such light distributions can be classified as either near-field or far-field distributions.

While near-field distributions specify an irradiance distribution on a given surface (typically a plane) that is to be reproduced, far-field distributions can be considered as limit cases where the surface to be illuminated is infinitely far away from the reflector, so that only the distribution of the ray directions matters. Methods for inverse reflector design typically employ an analysis-by-synthesis approach. A certain surface representation is chosen to parametrize the reflector, such as NURBS [Anson et al. 2008]. Then, the light distribution caused by a surface is evaluated and rated against the desired one. This method is iteratively used to optimize the surface parameters. Various optimization strategies have been applied, including frameworks that allow an analytical differentiation, thereby enabling the use of the conjugate gradient method [Neubauer 1997], and methods that compute derivatives approximately [Finckh et al. 2010] to ones that employ no derivatives at all [Anson et al. 2008].

Examples using an evolutionary optimization [Doyle et al. 1999] also belong to the latter category. Common simplifications in the approaches are the assumption of perfect specularity of the surface and the assumption of only one bounce of light without interreflections or occlusions, although exceptions to both also exist [Patow et al. 2007; Mas et al. 2009]. The restriction to rotationally symmetric reflectors is also commonly used, particularly in theoretical works [Westcott and Norris 1975].

These works mostly focus on reflective surfaces, although many approaches readily can be extended to refraction as well. One noteworthy example investigating the problem of refraction is the work by Finckh et al. [2010]. They use GPU computations to speed up the caustic evaluation, and a stochastic approximation algorithm for the optimization, which is able to find a global optimum.

Concerning refractive objects, the field of lens design is also noteworthy, although the goals of these problems are different, e.g. aberration correction. These problems are often restricted to a small number of parameters such as radii of the underlying primitive shapes [Patow and Pueyo 2005]. Again, there are exceptions, e.g. the work by Loos et al. [1998], who use a NURBS-based representation to optimize progressive lenses.

Weyrich et al. [2009] have chosen a different approach to reproduce a pre-specified far-field distribution. First, they generated a set of sloped, planar microfacets to realize the desired distribution of ray directions. Then, they arranged the microfacets in a regular array using simulated annealing to minimize the resulting discontinuities. Closely related to Weyrich et al.'s work is the system for near-fields proposed by Papas et al. [2011]. They extended the notion of microfacets to curved micropatches, which are used to produce specks of light with an anisotropic Gaussian distribution. To compute the shape of the micropatches that produce a Gaussian irradiance distribution, Papas et al. define a bijective mapping between points in the micropatch domain and points on the projection plane, analytically compute the surface normals that refract/reflect the light in this way, and finally integrate this normal field to arrive at the required micropatch surface.

It is an object of the present invention to provide a method for producing a reflective or refractive surface that reflects or refracts light shined thereon and reproduces on a screen a desired greyscale intensity image on which the reflective or refractive surface is based and a corresponding apparatus, wherein the method permits a reproduction of a reference grayscale image with adjustable precision.

Embodiments of the subject method comprise the acts of discretizing a two dimensional image into a first mesh of first nodes on a first surface, wherein nodes on the first surface define a first cell area A_(d,1) of the first mesh on which a first beam of light with a first radiant flux Φ_(i) is incident, wherein the first cell area A_(d,1) of the first mesh corresponds to an area of the two-dimensional image having a brightness to which the first radiant flux Φ₁ corresponds; discretizing a reflective or refractive second surface into a second mesh of second nodes, wherein nodes on the second surface define a first cell area A_(s,i) of the second mesh on which the first beam of light with the first radiant flux Φ_(i) is incident and is deviated towards the first cell area A_(d,1) of the first mesh; and adjusting the positions of the nodes of the first cell area A_(s,1) of the second mesh on the second surface so that the first cell area A_(s,1) of the second mesh corresponds to a predefined radiant exitance M₁ of the first beam of light incident on the second surface.

According to embodiments of the subject method a height field is inferred from a given two dimensional grayscale image or caustic mesh by a “backward” calculation. The grayscale image is described by a fixed first mesh of first nodes defining cell areas of the first mesh between the nodes, while the nodes of the second mesh defining cell areas of the second mesh between the nodes on the specular or refractive second surface from where the rays emanate to the surface where the grayscale image is produced are moved. By deforming the second mesh or its cell areas, the desired amounts of light can be allocated to the corresponding cells of the fixed first mesh, wherein the larger the area of a cell in the “warped” second mesh on the specular plane is, the more light is projected on the unchanged cell area in the caustic mesh, increasing the brightness.

According to an embodiment the method further includes determining surface normals at each of the nodes of first cell area A_(s,1) of the second mesh with adjusted positions on the second surface, the surface normals corresponding to rays of the first beam of light that are incident on the second surface and extend between the nodes of the first cell area A_(s,1) of the second mesh with adjusted positions on the second surface and the nodes of the first cell area A_(d,1) of the first mesh on the first surface; and calculating a height field corresponding to the surface normals.

According to another embodiment, the method comprises the adjusting of the positions of nodes of all cell areas A_(s,i) of the second mesh. Once the desired deformation of the second mesh is found by applying the method to all cell areas of the second mesh, the normal field can be obtained. A mesh may include any suitable number of cells such as 10000, 1 million, 10 million, 100 million or any number in between. Both meshes may include the same number of cells.

The amount of light transported through a frustum defined by the rays forming a cell area of the first or second mesh remains constant. This allows assigning a brightness value to each cell of the first mesh, i.e. the photon mesh. Further details with regard to an embodiment for determining the desired areas of the cells in the warped mesh on the second surface are described in Chapter 3.1. Quad Brightness and Chapter 3.2. Integrability of the annex.

The actual geometry of the second surface can be ignored in a first instance and is reduced to the corresponding field of surface normals. In order to reflect or refract rays at the node of the deformed second mesh on the specular second surface such that they intersect the receiving first mesh at the designated points, the normal field needs to be adjusted accordingly. Accordingly, normals n are computed from the incident and exitant ray directions a and b, wherein these vectors are assumed to be normalized and to point away from the specular surface. In a case of reflection, the normal can be inferred from incident and exitant directions according to the well-known Snell's law. For a case of refraction, it is assumed that the ray directions are physically meaningful and that they describe an actual refraction and not a total internal reflection. The desired surface normals can be computed in a simple way from a linear combination of the normalized ray directions.

According to one embodiment this can be done by interpolating the outgoing ray directions at the grid nodes using barycentric coordinates. Further details with regard to an embodiment for determining normals n from the incident and exitant ray directions a and b are described in Chapter 2.2. Backward Caustics and in Chapter 2.2.1 Ray Directions to Normals of the annex.

The normal field can then be integrated to a height field which forms the surface that can be transferred to a transparent or reflective material. According to one embodiment this is achieved with an optimization algorithm that combines the requirement of an integrable normal field with the goal of reproducing an arbitrary intensity target image by the caustic created through reflection or refraction of the computed object. The optimization algorithm enables a user to specify arbitrary target intensity images and to obtain a reflective or refractive surface that, under the provided geometric configuration with respect to the caustic receiver and given incident lighting direction, produces a caustic pattern. Further details with regard to an embodiment for converting a normal field to a height field are described in chapter 2.3 Normal Fields to Height Fields and 2.3.1. Normal Equations Matrix of the annex.

According to an embodiment the field of surface normals is continuous and the height field is continuously differentiable. This simplifies the computations assuming that the caustic forms a continuous pattern. Furthermore, shadowing, interreflection, and dispersion effects can be ignored.

According to one embodiment the second surface to which the second mesh corresponds is perfectly specular and the surface of the caustic receiver, that is, the first surface on which the caustic image is visible, is assumed to be planar.

According to another embodiment the first mesh of first nodes and the second mesh of second nodes form a triangular or a quadrangular mesh comprising triangular or quadrangular cell areas. In principle, a mesh having any arbitrary structure can be used.

According to one embodiment, the first cell area A_(d,i) of the first mesh and the first cell area A_(s,i) of the second mesh are formed by at least three nodes. However, they may also be formed by any other suitable number of nodes including 4, 5, 6, 8, 10 or more nodes.

According to a further embodiment the first mesh of first nodes is a regular fixed mesh. Further details with regard to an embodiment for discretizing a height field as a regular grid are described in chapter 2.1 Forward Caustics of the annex.

According to yet another embodiment the method further comprises adjusting of the positions of nodes of a second cell area A_(s,2) of the second mesh adjacent to the first cell area A_(s,i) of the second mesh so that the second cell area A_(s,2) of the second mesh corresponds to a predefined second radiant exitance M₁ of a second beam of light incident on the second surface, wherein the second beam of light is adjacent to the first beam and has a respective radiant flux Φ₂ incident on a first cell area A_(d,2) of the first mesh and on the second cell area A_(s,2) of the second mesh that corresponds to a brightness in the respective second cell area A_(d,2) of the first mesh of the two-dimensional image, and wherein the first cell area A_(s,1) of the second mesh and the second cell area A_(s,2) of the second mesh have at least one node in common. Again the amount of light transported through each frustum defined by the rays delimiting a cell area A_(s,i) of the first or second mesh remains constant. This allows assigning a brightness value to each field or cell area of the mesh which may include millions of cells. Further details with regard to an embodiment for reproducing a normal field by a height field are described in chapter 2.1 Integrability of the annex.

According to one embodiment the total area of the second mesh on the second surface including the sum of all second cell areas A_(s,i) remains unchanged after the adjustment of the position of the nodes compared to the total area of the second mesh before the adjustment.

According to another embodiment the adjacent beams of light incident on the second surface comprise the same radiant exitance M_(i). This represents a situation in which the second surface is irradiated with a collimated beam of light having a homogeneous distribution of intensity.

According to the invention another method for forming a reflective or refractive surface is provided which comprises the acts of discretizing a two dimensional image into a first mesh of first nodes on a first surface, wherein nodes on the first surface define a first cell area A_(d,i) of the first mesh on which a beam of light with a first radiant flux Φ_(i) is incident; discretizing a reflective or refractive second surface into a second mesh of second nodes, wherein nodes on the second surface define a first cell area A_(s,i) of the second mesh on which the beam of light with the first radiant flux Φ_(i) is incident; and adjusting the positions of the nodes of the first cell area A_(d,i) of the first mesh on the first surface to correspond to a predefined radiant exitance M₁, wherein the predefined radiant exitance M₁ corresponds to a desired brightness of the two-dimensional image in the first cell area A_(d,i) of the first mesh.

According to this method of the invention a height field is inferred from a given two dimensional grayscale image or caustic mesh by a “backward” calculation to determine a surface such that the reflection or refraction off that surface generates the desired caustic image. The grayscale image is described by a first mesh of first nodes and the reflective or refractive surface is described by a second mesh of second nodes. In contrast to the first method described above the nodes of the second mesh on the specular or refractive second surface from where the rays emanate to the caustic are fixed, while the nodes of the first mesh, i.e. on the caustic are moved. Hence, the first mesh or photon mesh is deformed to reproduce a given image. By deforming the first mesh, the desired amounts of light (radiant exitance M_(i)) can be allocated to the corresponding faces of the caustic, wherein the smaller the area of a face in the first mesh on the first surface is where the grayscale image or caustic is produced, the higher the amount of light per area of the face in the first mesh of the caustic becomes, increasing its brightness. In contrast, a larger area of a face of the first mesh on the first surface results in a reduced brightness. Once the deformation of this first mesh is found, the normal field is obtained similar to the method described above. A mesh may include any suitable number of cells such as 10000, 1 million, 10 million, 100 million or any number in between.

According to an embodiment the method further comprises determining surface normals of the second surface at each of the nodes of the first cell area A_(d,i) of the second mesh, the surface normals corresponding to rays of the beam of light that are incident on the second surface and extend between the nodes of the first cell area A_(d,1) of the second mesh on the second surface and the nodes with adjusted positions of the first cell area A_(d,i) of the first mesh on the first surface; and calculating a height field corresponding to the surface normals.

In order to reflect or refract rays on the specular second surface such that they intersect the receiving surface with the first mesh at the designated points, the normal field needs to be adjusted accordingly. Accordingly, normals n are computed from the incident and exitant ray directions a and b, wherein these vectors are assumed to be normalized and to point away from the specular surface. In the case of reflection, the normal can be inferred from incident and exitant directions according to the well-known Snell's law. For a case of refraction, it is assumed that the ray directions are physically meaningful and that they describe an actual refraction and not a total internal reflection. The desired surface normals can be determined from a linear combination of the normalized ray directions. According to one embodiment this can be done by interpolating the outgoing ray directions at the grid nodes using barycentric coordinates. Further details with regard to an embodiment for determining normals n from the incident and exitant ray directions a and b are described in Chapter 2.2. Backward Caustics and in Chapter 2.2.1 Ray Directions to Normals of the annex.

The normal field can then be integrated to a height field which forms the surface that can be transferred to a transparent or reflective material. This can be done by solving for the continuous surface that best fits the normal field. Further details with regard to an embodiment for integrating a normal field to a height field are described in Chapter 4.1.7 Integrability of the annex.

According to another embodiment the field of surface normals is continuous and the height field is continuously differentiable. This characteristic may ensure that the deformation of the photon mesh leads to a meaningful normal field. According to an embodiment a solution to this problem is an optimization algorithm that combines the requirement of an integrable normal field with the goal of reproducing an arbitrary intensity target image by the caustic created through reflection or refraction of the computed object. Further details with regard to an embodiment for integrating a normal field to a height field are described in Chapter 4.1.7 Integrability of the annex.

According to another embodiment the first mesh of first nodes and the second mesh of second nodes are a triangular or a quadrangular mesh comprising triangular or quadrangular cell areas. In principle, a mesh having any arbitrary structure can be used.

According to one embodiment, the first area A_(d,i) of the first mesh and the second area A_(s,i) of the second mesh are formed by at least three nodes. However, they may also be formed by any other suitable number of node including 4, 5, 6, 8, 10 or more nodes.

According to a further embodiment the second mesh of second nodes is a regular fixed mesh.

According to yet another embodiment the method further comprises the adjusting of the positions of nodes of a second cell area A_(d,2) of the first mesh adjacent to the first cell area A_(d,1) of the first mesh, wherein the second cell area A_(d,2) of the first mesh corresponds to a second beam of light that is adjacent to the first beam of light wherein the second beam of light has a second radiant exitance M₂ on the second cell area A_(d,2) of the first mesh that corresponds to a brightness in the respective second cell area A_(d,2) of the first mesh of the two-dimensional image.

According to an embodiment the second cell area A_(d,2) of the first mesh and the first cell area A_(d,1) of the first mesh have at least one node or two or more nodes in common.

According to an embodiment, the method comprises the adjusting of the positions of nodes of all cell areas A_(d,i) of the first mesh.

According to a further embodiment the adjacent beams of light comprise the same radiant flux Φ_(i) and the same radiant exitance M_(i) on the first and second cell areas A_(s,i) of the second mesh (9), respectively, and comprise the same radiant flux Φ_(i) and different radiant exitances M₁ and M₂ on the first and second cell areas A_(d,i) of the first mesh (1) having adjusted node positions, respectively.

According to a further embodiment the method further comprises adjusting the positions of nodes of a second cell area A_(d,2) of the first mesh, wherein the second cell area A_(d,2) of the first mesh corresponds to a second beam of light that has a second radiant exitance M₂ at the second cell area A_(d,2) of the first mesh and at least partially overlaps the first cell area A_(d,1) of the first mesh so that the superposition of the first beam of light and the second beam of light corresponds to a superposed light intensity in the overlapping first cell area A_(d,1) of the first mesh and second cell area A_(d,2) of the first mesh on the first surface.

The superposition of the first beam of light and the second beam of light and of corresponding regions of the first mesh that overlap to create very bright spots, areas or lines in the caustic image are called folds. Further details with regard to an embodiment for generating folds and the characteristics and features of a corresponding fold generator are described in the Chapter Fold Generator, in Chapter 4.1 Realization, in Chapter 4.1.1. Fold Positions, in Chapter 4.1.2 Edge Orientation, in Chapter 4.1.3 Fold Orientation, in Chapter 4.1.4. Derivative-free Fold Orientation, and in Chapter 4.1.5 Enforcing Folds of the annex.

According to a further embodiment the overlapping first cell area A_(d,1) of the first mesh and the second cell area A_(d,2) of the first mesh correspond to at least one step transition of the light intensity or a singularity of the light intensity in the two dimensional image. A step transition may include an increase of light intensity in the two dimensional image of more than 10%, 20%, 30%, 40%, 50% or 100% or more between two points of the image that are at a distance of less than 1/1×10³ 1/1×10⁴ or 1/1×10⁶ or less of the diameter of the image. Furthermore, the step transition of light intensity can be described by a step function or a function singularity of the light intensity at a line or point of the image.

According to a further embodiment the method comprises adjusting the positions of the nodes of multiple or all cell areas A_(d,i) of the first mesh, wherein the multiple cell areas A_(d,i) of the first mesh correspond to multiple adjacent beams of light having respective radiant exitances M_(i) on the cell areas A_(d,i) of the first mesh and on the cell areas A_(s,i) of the second mesh, the cell areas A_(d,i) of the first mesh at least partially overlapping each other corresponding to multiple overlapping beams of light, wherein the regions on the first surface where the multiple beams of light superpose with each other include the regions of the step transitions of light intensity of the two-dimensional image.

According to another embodiment the method comprises adjusting the positions of the nodes of multiple or all cell areas A_(d,i) of the first mesh, wherein the multiple cell areas A_(d,i) of the first mesh correspond to multiple adjacent beams of light having respective radiant exitances M_(i) on the cell areas A_(d,i) of the first mesh and on the cell areas A_(s,i) of the second mesh, wherein some of the cell areas A_(d,i) of the first mesh at least partially overlap each other corresponding to multiple overlapping beams of light, wherein the regions on the first surface where the multiple beams of light superpose with each other include the regions of step transitions of light intensity of the two-dimensional image and some of the cell areas A_(d,i) of the first mesh do not overlap each other corresponding to adjacent beams of light incident on adjacent cell areas A_(d,i) of the first mesh.

According to a further embodiment the act of adjusting the positions of the nodes of the cell areas A_(d,i) of the first mesh and of determining the surface normals of the second surface at the nodes of the first cell areas A_(d,1) of the second mesh having adjusted positions is performed with an optimization algorithm. The adjusting of the positions of the nodes of the cell areas A_(d,i) of the first mesh can be done according to the details in Chapter 3.1 Quad Brightness of the annex. However, other methods can be suitable as well.

According to another embodiment the method further comprises the act of determining at least one cell area A_(d,i) of the first mesh which comprises at least one edge of a step transition of light intensity corresponding to a light intensity function singularity in the two dimensional image and determining the position of the edge of the transition of light intensity in the at least one cell area A_(d,i) of the first mesh.

According to another embodiment the act of determining at least one cell area A_(d,i) of the first mesh which comprises at least one edge of a transition of light intensity includes using the Canny edge detection algorithm.

According to still another embodiment the method further comprises the act of determining a vector d_(C,i) defining the orientation of the edge of the transition of light intensity and the direction of either high or low light intensity in the two-dimensional image with regard to the edge. The vector d_(C,i) can be defined as having a position perpendicular to the edge of the transition of light intensity.

According to yet a further embodiment adjusting the positions of nodes of the first cell area A_(d,1) of the first mesh on the first surface and of the second cell area A_(d,2) of the first mesh on the first surface is at least partially in correspondence with the position of the edge of transition of light intensity so that the second cell area A_(d,2) of the first mesh corresponding to the second beam of light overlaps the first cell area A_(d,1) of the first mesh in a region which includes the edge of transition of light intensity and the first beam of light correspondingly overlaps the second beam of light.

According to another embodiment the method includes performing an optimization using an optimization algorithm to obtain the surface normals of the second surface. The surface normals of the second surface can be obtained once the positions of the nodes of the first cell area A_(d,1) of the first mesh on the first surface and of the second cell area A_(d,2) of the first mesh on the first surface have been determined.

According to yet another embodiment, the method includes the physical manufacturing of a surface of material according to the height field. The material can have a specular surface to reflect light or can be transparent to refract light. The material can consist of refractive acrylic glass or comprise this material or can consist of reflective aluminium or any other metal or comprise this material.

According to yet another embodiment, the method includes manufacturing the surface with multiple planar cell areas according to the calculated height field.

According to a further embodiment the cell areas can have a concave or convex shape. The shape can be achieved by a corresponding polishing process.

According to yet another embodiment, the method includes polishing the manufactured surface to remove or reduce edges.

According to yet another embodiment, the method includes providing a light source that is configured to shine collimated light, parallel light or light of a point light source on the surface comprising a height field.

According to the invention an apparatus is provided that is configured to carry out the method as previously described. According to one embodiment the system is configured to process the surface of a material to comprise the shape according to a height field as determined by the method as previously described.

According to an embodiment the system comprises a module that is configured to determine based on a template image the deformation of a mesh comprising several cells which correspond to imaginary partial light beams each having a respective radiant flux Φ_(i) such that in the deformed mesh each area of a cell corresponds to a predetermined light intensity or exitance M_(i) of the respective imaginary partial beam, the sum of the predetermined light intensities forming the template image.

According to another embodiment the system comprises a module that is configured to obtain a field of surface normals on a surface on which the imaginary partial light beams impinge based on the determined deformation of the mesh. The surface may correspond to a refractive or reflective surface or to a surface corresponding to an image formed by the imaginary partial light beams.

According to an embodiment the system comprises a module that is configured to determine a height field based on the field of surface normals, the height field representing a surface of a refractive or reflective slab of material that produces the template image when light is shined on it.

According to another embodiment the system comprises an optimization algorithm calculating at least one of the deformed mesh, the field of surface normal and the height field.

According to an embodiment the system comprises a fold generator capable of detecting and determining the position and/or orientation of a transition of light intensity in the template image.

According to yet another embodiment the fold generator includes a module for determining the deformation of a mesh corresponding to light intensities of imaginary partial beams defined by the template image, wherein the module considers at least one edge of a light transition in the template image as a singularity of the light intensity distribution function and/or as an area where the cells of the deformed mesh overlap each other corresponding to an overlap of beams emanating from different cell areas of a fixed mesh on the refractive or reflective surface. Due to the overlapping cells folds or overlapping light intensities are generated in the image that is generated when light is shined on the surface corresponding to the height field.

Furthermore, according to an embodiment one or more computer storage media having stored thereon multiple instructions that, when executed by one or more processors of a device cause the one or more processors to perform a method according to one or more embodiments described above.

Further characteristics advantages and features of the invention will result from the following description of exemplifying embodiments of the invention with reference to the enclosed drawings and the annex. In the drawing

FIG. 1 shows the reflection of a light beam on a specular surface and its deviation to a photon mesh as a basic principle of the embodiment;

FIG. 2 schematically shows deforming (vertices u_(i,j)) of a mesh on the specular plane, while the mesh on the receiving surface (vertices x_(i,j)) is fixed;

FIG. 3 shows a schematic sketch of the optimization method for generating a reflective (left) or refractive (right) surface wherein the required surface normal vectors (middle row) are computed such that the reflection or reflection of the uniform incoming light creates the desired caustic image and the actual 3D surface is obtained through integration (bottom row);

FIG. 4 schematically shows deforming (vertices u_(i,j)) of a mesh on the receiving plane, while the mesh on the specular surface (vertices x_(i,j)) is fixed;

FIG. 5 shows the result of a caustic optimization, wherein the input intensity image is shown in (a), an actual produced caustic computed with a global illumination light simulation tool is shown in (b), a difference image in (c) illustrates, that the differences are minor, and the caustic in (b) is produced by a height-field surface whose iso-contour lines are shown in (d);

FIG. 6 shows in the top row caustics of a reflective strip which start to overlap itself as the strip to bent, creating a fold, and in the bottom row a caustic with folds obtained with a reflective or reflective surface that matches the shape of input target images (a, c), and creates a lively caustic pattern with folds as shown in light simulations (b, d).

Embodiments of the invention will be described with reference to FIGS. 1 to 6. According to a first embodiment a reflective surface has been produced based on a given grayscale image (FIG. 5 a), wherein the reflection or refraction off that generated surface reproduces the original grayscale image (FIG. 5 b).

In the method it was assumed that no inter-reflection and shadowing effects occurred, and the specular surfaces were assumed to be smooth, so that the generated caustic will be contiguous. This allowed the use of a two-dimensional mesh that basically defines the cross section of the light beam.

The original grayscale image on a planar surface 2 was discretized in a regular mesh 1 and the specular surface 5 was discretized in a regular mesh 9 as well. According to the discretization of the image and the surface, a hypothetical light beam is discretized into several partial beams, wherein each partial beam corresponds to a cell 3 of the mesh 1 on the discretized grayscale image and a cell 11 on the specular surface 5.

While a fixed mesh 1 was used to describe the grayscale image, the nodes of the mesh 9 of the specular surface 5 which confine the partial beam are moved around. By deforming that mesh 9, the desired amounts of light can be allocated to the corresponding faces of the caustic that is to be reproduced. The allocation of the desired amounts of light is based on the intensity distribution in the discretized grayscale image: the larger the area of a cell in the warped mesh 9 on the specular surface 5, the more light is projected on the unchanged cell area in the caustic mesh 1, increasing its brightness. The boundary vertices of the warped mesh 9 were confined to remain on the border.

Assuming perfect specularity of the specular surface 5, the radiant flux Φ_(i) (the total emitted or incident power) remains constant throughout each beam that can be defined by a triangle, quadrilateral or multilateral cell area of the mesh 1 or 9 (see FIG. 1). The flux is equal to the radiant exitance M_(i) (the emitted power per unit area) times the area in the original mesh A_(o,i),

Φi=M_(i)A_(o,i);  (1)

it is equal to the irradiance I_(s,i) (the incident power per unit area) times the area A_(s,i) on the specular surface,

Φ_(i)=I_(s,i)A_(s,i);  (2)

and equal to the irradiance I_(d,i) times the area A_(d,i) on the receiver,

Φ_(i)=I_(d,i)A_(d,i);  (3)

Assuming a parallel light source and equally-sized triangles, M_(i) and I_(s,i) are the same for each triangle. Consequently, the resulting irradiance on the receiver surface 2, the contribution by this triangle or multilateral is proportional to the original area divided by the resulting area in the photon mesh 1. Basically, this is the resulting caustic brightness when a Lambertian (i.e. perfectly diffuse) reflectance model is assumed for the receiver.

Once the deformation of this mesh 9 is found, the normal field is obtained by interpolating the outgoing ray directions at the grid nodes using barycentric coordinates. The determination of the deformation of the mesh 9 is described in the Chapter 3.1. Quad Brightness of the annex, while the determination of the normal field according to one embodiment is described in Chapter 3.2. of the annex.

The normal field is subsequently integrated to a height field surface. This height field surface reproduces the desired caustic images with a very high accuracy. The height field surface was subsequently transferred to a reflective surface of a material plate.

A result of a caustic that is generated by shining light on the manufactured reflective surface is shown in FIG. 5 b. FIG. 5 a shows the intensity image on which the manufactured reflective surface was based. The difference image shown in FIG. 5 c illustrates that the differences between the original intensity image and the caustic produced with the manufactured reflective surface are minor. A calculated height-field surface comprising iso-contour lines is shown in FIG. 5 d.

According to a further embodiment a refractive or reflective specular surface was generated that produces a caustic with folds. Folds are effects that are produced by a superposition of beams emanating from different cell areas of the specular surface. Folds are the typical bright contours that occur when a contiguous caustic overlaps itself (see FIG. 6 at the top row). The introduction of folds does not support the precise reproduction of an original image but emphasizes prominent features in the original image. They also introduce an ambiguity in the sense that a point of the caustic pattern cannot be traced back to exactly one point on the reflective or refractive surface. Hence, a caustic including folds may comprise additional optic effects that are not necessarily included in the original image.

For this approach a fixed, regular mesh on the reflective or refractive surface (vertices x_(i,j)) was considered, and a mesh of the same connectivity on the receiving surface (vertices u_(i,j)) was deformed (see FIG. 4). The vectors pointing from x_(i,j) to u_(i,j) are the desired directions of the rays reflected or refracted on the specular surface. While a fixed mesh 9 of the specular surface 5 was used, the nodes of the mesh 1 describing the grayscale image are moved around. By deforming that mesh 1, the desired amounts of light can be allocated to the corresponding faces of the caustic that is to be reproduced. The allocation of the desired amounts of light is based on the intensity distribution in the discretized grayscale image: the larger the area of a cell in the warped mesh 1 that corresponds to the grayscale image on the receiving surface 1, the less light is projected on the cell area in the caustic mesh 1, decreasing its brightness. This principle is shown in FIG. 3 for reflective caustic in the left row and for refractive caustics in the right row.

However, the process described so far does not include folds. As the input for the generation of folds the Canny edge detection algorithm was used to detect edges and transitions of light intensity in an input image. In particular with the detection algorithm cells of the mesh were determined that included transitions of light intensity. Then the position and orientation of the edges and transitions of light intensity were determined. Using an optimization algorithm, the deformation of the mesh 1 on the caustic surface is determined, wherein transition edges are treated as singularities of the light intensity distribution function and as areas where the cells of the original mesh 1 overlap each other and accordingly the beams emanating from different cell areas of the fixed mesh 9 on the specular surface 5.

Using the incoming and outgoing ray directions from the specular surface 5 to the surface 1 of the caustic, the normal field was computed, and then a height field was found that optimally matched these normals using the approach described in Chapter 2.3. Normal Fields to Height Fields of the annex (see FIG. 3).

Variables that have been used to characterize the desired folds in the cells of the mesh are described in Chapters 4.1., and 4.1.1 to 4.1.9 of the annex.

Subsequently, the normal field was generated which was then integrated to a height fields. It was again ensured that the generated normal field could be integrated to a height field. In this aspect, the method that has been used is roughly the same as for the above embodiment and as described in chapter 3.2 of the annex.

Examples of caustics with folds which have been obtained with reflective or refractive materials to which calculated height fields have been transferred are shown in FIG. 6, in the bottom row. FIGS. 6 a and c describe the target image based on which height fields have been determined and calculated and FIGS. 6 b and d show the caustic images comprising folds that have been obtained by shining light on slabs of a transparent or reflective material comprising a surface structure corresponding to the calculated height field.

Is it is clearly visible, that the folds in addition to emphasizing prominent structures of the target images such as edges of light transitions comprise appear at other positions not related to the original image and comprise a shape which is not fully predictable. However, this artificial aspect in the caustic images is desirable. However, as is visible in FIG. 6 b and d, the position and generation of the folds in the caustic is controlled, since the folds have been generated to appear within the bright white areas of the original target image only.

Modifications may be applied to the specific embodiments described above without leaving the scope of the invention.

EMBODIMENTS Embodiment 1

A method for forming a reflective or refractive surface, comprising:

-   -   discretizing a two-dimensional image into a first mesh (1) of         first nodes on a first surface (2), wherein nodes on the first         surface (2) define a first cell area A_(d,1) of the first mesh         (1) on which a first beam of light with a first radiant flux Φ₁         is incident, wherein the first cell area A_(d,1) of the first         mesh (1) corresponds to an area of the two-dimensional image         having a brightness to which the first radiant flux Φ₁         corresponds;     -   discretizing a reflective or refractive second surface (5) into         a second mesh (9) of second nodes, wherein nodes on the second         surface (2) define a first cell area A_(s,1) of the second mesh         (9) on which the first beam of light with the first radiant flux         Φ_(i) is incident and is deviated towards the first cell area         A_(d,1) of the first mesh (1); and     -   adjusting the positions of the nodes of the first cell area         A_(s,1) of the second mesh (9) on the second surface (2) so that         the first cell area A_(s,1) of the second mesh (9) corresponds         to a predefined radiant exitance M₁ of the first beam of light         incident on the second surface (5).

Embodiment 2

Method according to embodiment 1, wherein

-   -   determining surface normals at each of the nodes defining the         first cell area A_(s,1) of the second mesh (9) with adjusted         positions on the second surface (2), the surface normals         corresponding to rays of the first beam of light that are         incident on the second surface (5) and extend between the nodes         of the first cell area A_(s,1) of the second mesh (9) with         adjusted positions and the nodes of the first cell area A_(d,1)         of the first mesh (1) on the first surface (2); and     -   calculating a height field corresponding to the surface normals,         the height field defining the reflective or refractive surface.

Embodiment 3

Method according to embodiment 1 or embodiment 2, wherein the field of surface normals is continuous and the height field is continuously differentiable.

Embodiment 4

The method according to anyone of embodiments 1 to 3, wherein the first mesh (1) of first nodes and the second mesh (9) of second nodes are a triangular or a quadrangular mesh comprising triangular or quadrangular cell areas.

Embodiment 5

The method according to anyone of embodiments 1 to 4, wherein the first mesh (1) of first nodes is a regular fixed mesh.

Embodiment 6

The method according to anyone of embodiments 1 to 5, further comprising the adjusting of the positions of nodes of a second cell area A_(s,2) of the second mesh (9) adjacent to the first cell area A_(s,1) of the second mesh (9) so that the second cell area A_(s,2) of the second mesh (9) corresponds to a predefined second radiant exitance M₁ of a second beam of light incident on the second surface (5), wherein the second beam of light is adjacent to the first beam and has a respective radiant flux Φ₂ incident on a first cell area A_(d,2) of the first mesh (1) and on the second cell area A_(s,2) of the second mesh (9) that corresponds to a brightness in the respective second cell area A_(d,2) of the first mesh (1) of the two-dimensional image, and wherein the first cell area A_(s,1) of the second mesh (9) and the second cell area A_(s,2) of the second mesh (9) have at least one node in common.

Embodiment 7

The method according to embodiment 6, wherein the adjacent first beam of light and second beam of light comprise the same radiant exitance M_(i) on the second surface (5).

Embodiment 8

A method for forming a reflective or refractive surface, comprising:

-   -   discretizing a two dimensional image into a first mesh (1) of         first nodes on a first surface (2), wherein nodes on the first         surface (2) define a first cell area A_(d,1) of the first mesh         (1) on which a beam of light with a first radiant flux Φ₁ is         incident;     -   discretizing a reflective or refractive second surface (5) into         a second mesh (9) of second nodes, wherein nodes on the second         surface (2) define a first cell area A_(s,2) of the second mesh         (9) on which the beam of light with the first radiant flux Φ₁ is         incident; and     -   adjusting the positions of the nodes defining the first cell         area A_(d,1) of the first mesh (1) on the first surface (2) to         correspond to a predefined radiant exitance M₁, wherein the         predefined radiant exitance M₁ corresponds to a desired         brightness of the two-dimensional image in the first cell area         A_(d,1) of the first mesh (1).

Embodiment 9

The method according to embodiment 8, determining surface normals of the second surface (3) at each of the nodes of the first cell area A_(d,1) of the second mesh (1), the surface normals corresponding to rays of the beam of light that are incident on the second surface (5) and extend between the nodes of the first cell area A_(s,1) of the second mesh (1) on the second surface (2) and the nodes with adjusted positions of the first cell area A_(d,1) of the first mesh (1) on the first surface (2); and

-   -   calculating a height field corresponding to the surface normals.

Embodiment 10

The Method according to embodiment 8 or embodiment 9, wherein the field of surface normals is continuous and the height field is continuously differentiable.

Embodiment 11

The method according to anyone of embodiments 8 to 10, wherein the first mesh (1) of first nodes and the second mesh (9) of second nodes are a triangular or a quadrangular mesh comprising triangular or quadrangular cell areas.

Embodiment 12

The method according to anyone of embodiments 8 to 11, wherein the second mesh (1) of second nodes is a regular fixed mesh.

Embodiment 13

The method according to anyone of embodiments 8 to 12, further comprising adjusting of the positions of nodes of a second cell area A_(d,2) of the first mesh (1) adjacent to the first cell area A_(d,1) of the first mesh (1), wherein the second cell area A_(d,2) of the first mesh (1) corresponds to a second beam of light that is adjacent to the first beam of light wherein the second beam of light has a second radiant exitance M₂ on the second cell area A_(d,2) of the first mesh (1) that corresponds to a brightness in the respective second cell area A_(d,2) of the first mesh (1) of the two-dimensional image.

Embodiment 14

The method according to embodiment 13, wherein the adjacent beams of light comprise the same radiant flux Φ_(i) and the same radiant exitance M_(i) on the first and second cell areas A_(s,i) of the second mesh (9), respectively, and comprise the same radiant flux Φ_(i) and different radiant exitances M₁ and M₂ on the first and second cell areas A_(d,i) of the first mesh (1) having adjusted node positions, respectively.

Embodiment 15

The method according to anyone of embodiments 8 to 14, further comprising adjusting the positions of nodes of a second cell area A_(d,2) of the first mesh (1), wherein the second cell area A_(d,2) of the first mesh (1) corresponds to a second beam of light that has a second radiant exitance M₂ at the second cell area A_(d,2) of the first mesh (1) and at least partially overlaps the first cell area A_(d,1) of the first mesh (9) so that the superposition of the first beam of light and the second beam of light corresponds to a superposed light intensity in the overlapping first cell area A_(d,1) of the first mesh (1) and second cell area A_(d,2) of the first mesh (1) on the first surface.

Embodiment 16

The method according to embodiment 15, wherein the overlapping first cell area A_(d,1) of the first mesh (1) and the second cell area A_(d,2) of the first mesh (1) correspond to at least one step transition of the light intensity or a singularity of the light intensity in the two dimensional image.

Embodiment 17

The method according to embodiment 15 or embodiment 16, comprising adjusting the positions of the nodes of multiple cell areas A_(d,i) of the first mesh (1), wherein the multiple cell areas A_(d,i) of the first mesh (1) correspond to multiple adjacent beams of light having respective radiant exitances M_(i) on the cell areas A_(d,i) of the first mesh (1) and on the cell areas A_(s,i) of the second mesh (9), the cell areas A_(d,i) of the first mesh (1) at least partially overlapping each other corresponding to multiple overlapping beams of light, wherein the regions on the first surface where the multiple beams of light superpose with each other include the regions of the step transitions of light intensity of the two-dimensional image.

Embodiment 18

The method according to anyone of embodiments 8 to 17, wherein the act of adjusting the positions of the nodes of the cell areas A_(d,i) of the first mesh (1) and of determining the surface normals of the second surface (3) at the nodes of the first cell areas A_(d,1) of the second mesh (1) having adjusted positions is performed with an optimization algorithm.

Embodiment 19

The method according to anyone of embodiments 8 to 18, further comprising the act of determining at least one cell area A_(d,i) of the first mesh (1) which comprises at least one edge of a step transition of light intensity corresponding to a light intensity function singularity in the two dimensional image and determining the position of the edge of the transition of light intensity in the at least one cell area A_(d,i) of the first mesh (1).

Embodiment 20

The method according to embodiment 19, wherein the act of determining at least one cell area A_(d,i) of the first mesh (1) which comprises at least one edge of a transition of light intensity includes using the Canny edge detection algorithm.

Embodiment 21

The method according to embodiments 19 or 20, further comprising the act of determining a vector d_(C,i) defining the orientation of the edge of the transition of light intensity and the direction of either high or low light intensity in the two-dimensional image with regard to the edge.

Embodiment 22

The method according to anyone of embodiments 15 to 19, wherein adjusting the positions of nodes of the first cell area A_(d,1) of the first mesh (1) on the first surface (2) and of the second cell area A_(d,2) of the first mesh (1) on the first surface (2) is at least partially in correspondence with the position of the edge of transition of light intensity so that the second cell area A_(d,2) of the first mesh (1) corresponding to the second beam of light overlaps the first cell area A_(d,1) of the first mesh (1) in a region which includes the edge of transition of light intensity and the first beam of light correspondingly overlaps the second beam of light.

Embodiment 23

The method according to anyone of embodiments 17 to 22, including performing an optimization using an optimization algorithm to obtain the surface normals of the second surface (3).

Embodiment 24

An apparatus for forming a reflective or refractive surface that is configured to carry out the method according to anyone of the preceding claims.

Embodiment 25

A system configured to determine based on a template image the deformation of a mesh (1, 9) comprising several cells which correspond to imaginary partial light beams each having a respective radiant flux Φ_(i) such that in the deformed mesh each area of a cell corresponds to a predetermined light intensity or exitance M_(i) of the respective imaginary partial beam, the sum of the predetermined light intensities forming the template image.

Embodiment 26

The system of embodiment 25 comprising a module that is configured to obtain a field of surface normals on a surface (2, 5) on which the imaginary partial light beams impinge based on the determined deformation of the mesh (1, 9), the surface (2, 5) corresponding to a refractive or reflective surface or to a surface corresponding to the template image formed by the imaginary partial light beams.

Embodiment 27

The system of embodiments 25 or 26 comprising a module that is configured to determine a height field based on the field of surface normals, the height field representing a surface of a refractive or reflective slab of material that produces the template image when light is shined on it.

Embodiment 28

The system of anyone of embodiments 25 to 27 comprising an optimization algorithm configured to calculate at least one of the deformed mesh (1, 9), the field of surface normals and the height field.

Embodiment 29

The system of anyone of embodiments 25 to 28 comprising a fold generator module capable of detecting and determining the position and/or orientation of a transition of light intensity in the template image.

Embodiment 30

The system of embodiment 29, wherein the fold generator module is capable of determining the deformation of a mesh (1, 9) corresponding to the light intensities of partial beams defined by the template image, wherein the module considers at least one edge of a light transition in the template image as a singularity of the light intensity distribution function and as an area where the cells of the deformed mesh (1, 9) overlap each other corresponding to an overlap of partial beams emanating from different cell areas of the mesh on the refractive or reflective surface.

Embodiment 31

One or more computer storage media having stored thereon multiple instructions that, when executed by one or more processors of a device cause the one or more processors to perform a method according to any of embodiments 1 to 23.

REFERENCE NUMERALS

-   -   1 first mesh     -   2 first surface     -   3 cell area of the first mesh     -   5 second surface     -   9 second mesh     -   11 cell area of the second mesh 

We claim:
 1. A method for forming a reflective or refractive surface, comprising: discretizing a two-dimensional image into a first mesh of first nodes on a first surface, wherein the first mesh of first nodes on the first surface define a first cell area A_(d,1) of the first mesh on which a first beam of light with a first radiant flux Φ₁ is incident, wherein the first cell area A_(d,1) of the first mesh corresponds to an area of the two-dimensional image having a brightness to which the first radiant flux Φ₁ corresponds; discretizing a reflective or refractive second surface into a second mesh of second nodes on a second surface, wherein the second mesh of second nodes on the second surface define a first cell area A_(s,1) of the second mesh on which the first beam of light with the first radiant flux Φ_(i) is incident and is deviated towards the first cell area A_(d,1) of the first mesh; and adjusting positions of the second nodes of the first cell area A_(s,1) of the second mesh on the second surface so that the first cell area A_(s,1) of the second mesh corresponds to a predefined radiant exitance M₁ of the first beam of light incident on the second surface.
 2. The method according to claim 1, further comprising: determining surface normals at each of the second nodes defining the first cell area A_(s,1) of the second mesh with adjusted positions on the second surface, the surface normals corresponding to rays of the first beam of light that are incident on the second surface and extend between the second nodes of the first cell area A_(s,1) of the second mesh with adjusted positions and the first nodes of the first cell area A_(d,1) of the first mesh on the first surface; and calculating a height field corresponding to the surface normals, the height field defining the reflective or refractive second surface.
 3. The method according to claim 2, wherein a field of surface normals corresponding to the surface normal is continuous and the height field is continuously differentiable.
 4. The method according to claim 1, wherein the first mesh of first nodes and the second mesh of second nodes are a triangular or a quadrilateral mesh comprising triangular or quadrilateral cell areas, respectively.
 5. The method according to claim 1, wherein the first mesh of first nodes is a regular fixed mesh.
 6. The method according to claim 1, further comprising adjusting positions of second nodes of a second cell area A_(s,2) of the second mesh adjacent to the first cell area A_(s,1) of the second mesh so that the second cell area A_(s,2) of the second mesh corresponds to a predefined second radiant exitance M₁ of a second beam of light incident on the second surface, wherein the second beam of light is adjacent to the first beam and has a respective radiant flux Φ₂ incident on a second cell area A_(d,2) of the first mesh and on the second cell area A_(s,2) of the second mesh that corresponds to a brightness in the respective second cell area A_(d,2) of the first mesh of the two-dimensional image, and wherein the first cell area A_(s,1) of the second mesh and the second cell area A_(s,2) of the second mesh have at least one second node in common.
 7. The method according to claim 6, wherein the first beam of light and the second beam of light comprise the same radiant exitance M_(i) on the second surface.
 8. A method for forming a reflective or refractive surface, comprising: discretizing a two dimensional image into a first mesh of first nodes on a first surface, wherein first nodes on the first surface define a first cell area A_(d,1) of the first mesh on which a first beam of light with a first radiant flux Φ₁ is incident; discretizing a reflective or refractive second surface into a second mesh of second nodes, wherein second nodes on the second surface define a first cell area A_(s,2) of the second mesh on which the first beam of light with the first radiant flux Φ₁ is incident; and adjusting positions of the first nodes defining the first cell area A_(d,1) of the first mesh on the first surface to correspond to a predefined radiant exitance M₁, wherein the predefined radiant exitance M₁ corresponds to a desired brightness of the two-dimensional image in the first cell area A_(d,1) of the first mesh.
 9. The method according to claim 8, determining surface normals of the second surface at each of the second nodes of the first cell area A_(d,1) of the second mesh, the surface normals corresponding to rays of the first beam of light that are incident on the second surface and extend between the second nodes of the first cell area A_(s,1) of the second mesh on the second surface and the first nodes with adjusted positions of the first cell area A_(d,1) of the first mesh on the first surface; and calculating a height field corresponding to the surface normals.
 10. The method according to claim 9, wherein a field of surface normals corresponding to the surface normals is continuous and the height field is continuously differentiable.
 11. The method according to claim 8, wherein the first mesh of first nodes and the second mesh of second nodes are a triangular or a quadrilateral mesh comprising triangular or quadrilateral cell areas.
 12. The method according to claim 8, wherein the second mesh of second nodes is a regular fixed mesh.
 13. The method according to anyone of claim 8, further comprising adjusting positions of nodes of a second cell area A_(d,2) of the first mesh adjacent to the first cell area A_(d,1) of the first mesh, wherein the second cell area A_(d,2) of the first mesh corresponds to a second beam of light that is adjacent to the first beam of light wherein the second beam of light has a second radiant exitance M₂ on the second cell area A_(d,2) of the first mesh that corresponds to a brightness in the respective second cell area A_(d,2) of the first mesh of the two-dimensional image.
 14. The method according to claim 13, wherein the first beam of light and the second beam of light have the same radiant flux Φ and the same radiant exitance M_(i) on the first and second cell areas A_(s,i) of the second mesh, respectively, and have the same radiant flux Φ_(i) and different radiant exitances M₁ and M₂ on the first and second cell areas A_(d,i) of the first mesh having adjusted node positions, respectively.
 15. The method according to claim 8, further comprising adjusting positions of first nodes of a second cell area A_(d,2) of the first mesh, wherein the second cell area A_(d,2) of the first mesh corresponds to a second beam of light that has a second radiant exitance M₂ at the second cell area A_(d,2) of the first mesh and at least partially overlaps the first cell area A_(d,1) of the first mesh so that a superposition of the first beam of light and the second beam of light corresponds to a superposed light intensity in an overlapping first cell area A_(d,1) of the first mesh and second cell area A_(d,2) of the first mesh on the first surface.
 16. The method according to claim 15, wherein the overlapping first cell area A_(d,1) of the first mesh and the second cell area A_(d,2) of the first mesh corresponds to at least one step transition of the light intensity or a singularity of the light intensity in the two dimensional image.
 17. The method according to claim 15, comprising adjusting positions of the first nodes of multiple cell areas A_(d,i) of the first mesh, wherein the multiple cell areas A_(d,i) of the first mesh correspond to multiple adjacent beams of light having respective radiant exitances M_(i) on the cell areas A_(d,i) of the first mesh and on the cell areas A_(s,i) of the second mesh, the cell areas A_(d,i) of the first mesh at least partially overlapping each other corresponding to multiple overlapping beams of light, wherein the regions on the first surface where the multiple beams of light superpose with each other include the regions of the step transitions of light intensity of the two-dimensional image.
 18. The method according to claim 8, wherein adjusting the positions of the first nodes of the cell areas A_(d,i) of the first mesh and determining the surface normals of the second surface at the nodes of the first cell areas A_(d,1) of the second mesh having adjusted positions is performed with an optimization algorithm.
 19. The method according to claim 8, further comprising determining at least one cell area A_(d,i) of the first mesh that comprises at least one edge of a step transition of light intensity corresponding to a light intensity function singularity in the two dimensional image and determining the position of the edge of the transition of light intensity in the at least one cell area A_(d,i) of the first mesh.
 20. The method according to claim 19, wherein determining at least one cell area A_(d,i) of the first mesh that comprises at least one edge of a transition of light intensity includes using the Canny edge detection algorithm.
 21. The method according to claim 19, further comprising determining a vector d_(d,i) defining an orientation of the edge of the transition of light intensity and a direction of either high or low light intensity in the two-dimensional image with regard to the edge.
 22. The method according to claim 15, wherein adjusting the positions of first nodes of the first cell area A_(d,1) of the first mesh on the first surface and the positions of the first nodes of the second cell area A_(d,2) of the first mesh on the first surface is at least partially in correspondence with the position of the edge of transition of light intensity so that the second cell area A_(d,2) of the first mesh corresponding to the second beam of light overlaps the first cell area A_(d,1) of the first mesh in a region which includes the edge of transition of light intensity and the first beam of light correspondingly overlaps the second beam of light.
 23. The method according to claim 17, further comprising performing an optimization using an optimization algorithm to obtain the surface normals of the second surface.
 24. An apparatus for forming a reflective or refractive surface, wherein the apparatus is configured to perform the method of claim
 1. 25. A system configured to determine based on a template image the deformation of a mesh comprising several cells which correspond to imaginary partial light beams each having a respective radiant flux Φ_(i) such that in the deformed mesh each area of a cell corresponds to a predetermined light intensity or exitance M_(i) of the respective imaginary partial beam, the sum of the predetermined light intensities forming the template image.
 26. The system of claim 25, comprising a module that is configured to obtain a field of surface normals on a surface on which the imaginary partial light beams impinge based on the determined deformation of the mesh, the surface corresponding to a refractive or reflective surface or to a surface corresponding to the template image formed by the imaginary partial light beams.
 27. The system of claim 25, comprising a module that is configured to determine a height field based on the field of surface normals, the height field representing a surface of a refractive or reflective slab of material that produces the template image when light is shined on it.
 28. The system of claim 25, comprising an optimization algorithm configured to calculate at least one of the deformed mesh, the field of surface normals and the height field.
 29. The system of claim 25, comprising a fold generator module capable of detecting and determining the position and/or orientation of a transition of light intensity in the template image.
 30. The system of claim 29, wherein the fold generator module is capable of determining the deformation of a mesh corresponding to the light intensities of partial beams defined by the template image, wherein the module considers at least one edge of a light transition in the template image as a singularity of the light intensity distribution function and as an area where the cells of the deformed mesh overlap each other corresponding to an overlap of partial beams emanating from different cell areas of the mesh on the refractive or reflective surface.
 31. One or more computer storage media having stored thereon multiple instructions that, when executed by one or more processors of a device cause the one or more processors to perform a method according to claim
 1. 